package routers

import (
	"device-admin/internal/app/web/controller"

	"github.com/gin-gonic/gin"
)

func advertising(rg *gin.RouterGroup) {

	// 素材管理
	rg.POST("material-list", controller.Advertising{}.MaterialList)                   // 素材列表
	rg.POST("audit-material-list", controller.Advertising{}.AuditMaterialList)        // 素材待审核列表
	rg.POST("material-audit", controller.Advertising{}.MaterialAudit)                 // 素材审核
	rg.POST("material-switch", controller.Advertising{}.MaterialSwitch)               // 素材禁用启用
	rg.POST("material-audit-log-list", controller.Advertising{}.MaterialAuditLogList) // 素材审核记录
	rg.POST("material-folder-list", controller.Advertising{}.MaterialFolderList)      // 素材文件夹列表

	// 投放计划
	rg.POST("publish-schedule-end", controller.Advertising{}.PublishScheduleEnd)                                        // 投放计划终止
	rg.POST("publish-schedule-list", controller.Advertising{}.PublishScheduleList)                                      // 投放计划列表
	rg.POST("publish-schedule-detail", controller.Advertising{}.PublishScheduleDetail)                                  // 投放计划详情
	rg.POST("publish-schedule-save", controller.Advertising{}.PublishScheduleSave)                                      // 投放计划编辑
	rg.POST("publish-schedule-audit", controller.Advertising{}.PublishScheduleAudit)                                    // 投放计划审核
	rg.POST("publish-schedule-audit-log-list", controller.Advertising{}.PublishScheduleAuditLogList)                    // 投放计划审核列表
	rg.POST("publish-schedule-list-orderinfo", controller.Advertising{}.PublishScheduleListOrderInfo)                   // 投放计划列表订单相关
	rg.POST("publish-schedule-detail-orderinfo", controller.Advertising{}.PublishScheduleDetailOrderInfo)               // 投放计划详情订单相关
	rg.POST("publish-schedule-audit-log-list-orderinfo", controller.Advertising{}.PublishScheduleAuditLogListOrderInfo) // 投放计划审核列表

	// 商户投放管理
	rg.POST("publish-merchant-list", controller.Advertising{}.PublishMerchantList)            // 商户列表
	rg.POST("publish-merchant-manage", controller.Advertising{}.PublishMerchantManage)        // 商户配置投放设备组
	rg.POST("publish-device-list", controller.Advertising{}.PublishDeviceList)                // 投放设备组设备列表
	rg.POST("publish-device-group-list", controller.Advertising{}.PublishDeviceGroupList)     // 投放设备组列表
	rg.POST("publish-device-group-save", controller.Advertising{}.PublishDeviceGroupSave)     // 投放设备组新增编辑
	rg.POST("publish-device-group-delete", controller.Advertising{}.PublishDeviceGroupDelete) // 投放设备组删除
	rg.POST("publish-device-group-manage", controller.Advertising{}.PublishDeviceGroupManage) // 投放设备组配置设备

	// 节目清单
	rg.POST("advertising-list", controller.Advertising{}.AdvertisingList)          // 节目清单
	rg.POST("advertising-sort", controller.Advertising{}.AdvertisingSort)          // 节目清单排序
	rg.POST("advertising-play-list", controller.Advertising{}.AdvertisingPlayList) // 广告播放清单

	// 支持活动
	rg.POST("support-activity-create", controller.Advertising{}.SupportActivityCreate)                              // 创建支持活动
	rg.POST("support-activity-update", controller.Advertising{}.SupportActivityUpdate)                                // 更新支持活动
	rg.POST("support-activity-delete", controller.Advertising{}.SupportActivityDelete)                                // 删除支持活动
	rg.POST("support-activity-detail", controller.Advertising{}.SupportActivityDetail)                                // 获取活动详情
	rg.POST("support-activity-list", controller.Advertising{}.SupportActivityList)                                  // 获取支持活动列表
	rg.POST("support-activity-change-status", controller.Advertising{}.SupportActivityChangeStatus)                 // 修改活动状态
	rg.POST("support-activity-same-name-exist", controller.Advertising{}.SupportActivitySameNameExist)             // 检查同名活动是否存在
	rg.POST("support-activity-get-activity-list-by-material-ids", controller.Advertising{}.SupportActivityGetActivityListByMaterialIDs) // 根据素材ID获取关联的活动列表
	rg.POST("support-activity-get-material-ids-list", controller.Advertising{}.SupportActivityGetMaterialIDsList) // 获取活动关联的素材ID列表
	rg.POST("support-activity-set-material-ids", controller.Advertising{}.SupportActivitySetMaterialIDs)          // 更新活动素材ID
}
